# -*- mode: snippet -*-
# name: horizontal bar plot - matplotlib
# key: matplotlib.hbar.stacked
# contributor: Shuguang Sun
# --
# -*- coding: utf-8 -*-
plt.rcdefaults()
fig, ax = plt.subplots()
$0
ax.barh(y_pos, performance, xerr=error, align='center')
ax.set_yticks(y_pos)
ax.set_yticklabels(people)
ax.invert_yaxis()  # labels read top-to-bottom
ax.set_xlabel('Performance')
ax.set_title('How fast do you want to go today?')

plt.show()